package org.kjtc;

import org.junit.runner.RunWith;
import org.kjtc.entity.WxChargingstationEntity;
import org.kjtc.entity.WxHttpChargingStation;
import org.kjtc.service.MapFindingPileService;
import org.kjtc.weChatUtil.HttpClientUtil;
import org.kjtc.weChatUtil.JsonUtils;
import org.kjtc.weChatUtil.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author: xiaojinlu1990@ 163.com
 * @Date: 2019/3/22 0022.
 * @Version 1.0
 * 查询实时状态的的站信息
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class tastTimeStation {
    @org.junit.Test
    public void Test(){
        //http://www.kejiatc.cn/billOperate/getChargingStationMassage?chargingStationID=jd001
        String url = "http://www.kejiatc.cn/billOperate/getChargingStationMassage";
        Map<String, String> params = new HashMap<>();
        params.put("chargingStationID","jd001");
        Map<String, String> heads = new HashMap<>();
       String jsonReslut = HttpClientUtil.httpGet(url,params,heads);
        Map<String, Object> chastation = JsonUtils.parseJsonToMap(jsonReslut);

        System.out.println(jsonReslut);
        // WxHttpChargingStation wxRedisChargingStation = JsonUtils.jsonToPojo(json(),WxHttpChargingStation.class);

    }


}
